/*
 * <h3>Title:wheel-parent系统</h3>
 * <p>Copyright (c) 2020, wnfbx@163.com. All rights reserved.</p>
 * @author wnfbx@163.com
 */
package com.wheel.autoconfigure.dynamicdatasource.aop;

import org.springframework.aop.framework.AopContext;

/**
 * <dt>Description:This</dt>
 * <dd>代理this工具</dd>
 *
 * @author wnfbx@163.com
 * @version 1.0 <i>2020/1/9 14:22</i>
 * @since jdk1.7+
 */
public class This {

    @SuppressWarnings("unchecked")
    public static <T> T proxy(T t) {
        try {
            return (T) AopContext.currentProxy();
        } catch (Exception e) {
            return t;
        }
    }
}
